package com.dmc.hrl.service.impl;

import com.dmc.hrl.domain.model.HomeContent;
import com.dmc.hrl.domain.model.ShopCart;
import com.dmc.hrl.domain.pojo.TbGoods;
import com.dmc.hrl.service.GoodsService;
import com.dmc.hrl.service.ShopCartService;
import com.dmc.hrl.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShopCartServiceImpl implements ShopCartService {

    @Autowired
    private GoodsService goodsService;

    @Override
    public ShopCart queryGoodsByName(String name) {
        ShopCart shopCart = new ShopCart();
        shopCart.setGoodsList(goodsService.queryGoodsByName(name));
        return shopCart;
    }
    @Override
    public ShopCart queryGoods(Integer id) {
        ShopCart shopCart = new ShopCart();
        shopCart.setGoodsObj(goodsService.queryGoods(id));
        return shopCart;
    }

}
